Get enum value from string or int

42

Get enum value from string or int -

MyEnum myEnum = (MyEnum)myInt;

MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), myString);

Comments

Submit
0 Comments